<?php

/**
 *
 * @author:
 * @date: 2015-11-18
 * @version: $Id: Base.php 12655 2015-11-21 09:36:42Z  $
 */
class BaseModel
{
    protected $request = NULL; // Request
    protected $session = NULL; // Session
    protected $db = NULL; //
    protected $yiyuan_id = 0;
    public function __construct($domain = NULL)
    {

        $this->db = Database::instance();
        // 医院ID
        $yiyuan_id = isset($_REQUEST['yiyuan_id']) ? $_REQUEST['yiyuan_id'] : "";
        if($yiyuan_id === "" )
        {
            Utility::apiJsonError(20028, '请输入医院ID');
        }
        elseif(!ctype_digit("$yiyuan_id"))
        {
            Utility::apiJsonError(20027, '医院ID必须是整型');
        }else{
            $this->yiyuan_id = intval($yiyuan_id);
        }
    }

}
